package com.banzhi.shop.utils;

import android.widget.Toast;

import com.banzhi.shop.MyApp;


public class ToastUtils {
    private static Toast toast=null;

    //string类型short的toast
    public static void makeToastShort(String content) {
        if (toast == null) {
            toast= Toast.makeText(MyApp.context, content, Toast.LENGTH_SHORT);
        }else{
            toast.setText(content);
        }
        toast.show();
    }

    //string类型Long的toast
    public static void makeToastLong(String content) {
        if (toast == null) {
            toast= Toast.makeText(MyApp.context, content, Toast.LENGTH_LONG);
        }else{
            toast.setText(content);
        }
        toast.show();
    }


}
